architecture basic of flashif is
begin
  process (clk) is
    if busy = ‘1’ then
      if rising_edge(clk) then
        ce <= en;
        ale <= ‘1’;
        cle <= ‘1’;
        if read = ‘0’ then
          we <= ‘1’;
          re <= ‘1’;
        else
          we <= ‘0’;
          re <= ‘0’;
        end if;
        if prog =’0’ then
          wp <= ‘0’;
        else
          wp <= ‘1’;
        end if;
      end if;
    end if;
  end process;
end architecture basic;